<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <div id="test">
    <p>count:{{count}}</p>
  </div>

  <script src="../js/vue.js"></script>
  <script>
    new Vue({
      el: "#test",
      data: {
        count:1
      },
      beforeCreate(){
        console.log('beforeCreate',this);
        console.log(this.count);
      },
      created(){
        console.log('created',this);
        console.log(this.count);
        this.test()
      },
      methods:{
        test(){
            console.log('test()');
        }
      }
    })
  </script>
</body>
</html>